package com.zmn.oms.dubbo.interfaces.zmn.normal.orderpay;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.common.dio.normal.pay.VerifyProgressDIO;
import com.zmn.oms.common.dro.PayChannelDRO;
import com.zmn.oms.dubbo.dto.common.orderpay.*;
import com.zmn.oms.dubbo.dto.common.work.BaseRequestDIO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 类描述：工单支付
 *
 * @author heciqi
 * @date 2020/7/15 10:05
 */
@Api(value = "工单支付服务")
public interface OrderPayRemoteService {

	/**
	 * 获取用户支付渠道
	 * @param orderId
	 * @return
	 */
	@ApiOperation(value = "获取用户支付渠道", response = ResponseDTO.class, notes = "用户支付渠道")
	ResponseDTO<UserPayChannelDRO> getUserPayChannel(@NotNull(message = "订单ID不能为空") Long orderId);

	/**
	 * 工单支付信息
	 *
	 * @param orderId
	 * @return
	 */
	@ApiOperation(value = "工单支付信息", response = ResponseDTO.class, notes = "工单支付信息")
	ResponseDTO<OrderPayInfoDRO> getOrderPayInfo(@NotNull(message = "订单ID不能为空") Long orderId);

	/**
	 * 工单支付信息
	 *
	 * @param orderPayInfoDIO
	 * @return
	 */
	@ApiOperation(value = "工单支付信息", response = ResponseDTO.class, notes = "工单支付信息")
	ResponseDTO<OrderPayInfoDRO> getOrderPayInfo(@NotNull(message = "入参不能为空") OrderPayInfoDIO orderPayInfoDIO);

	/**
	 * 校验现场支付
	 *
	 * @param baseRequestDIO
	 * @return
	 */
	@ApiOperation(value = "校验现场支付", response = ResponseDTO.class, notes = "校验现场支付")
	ResponseDTO<OrderLocalPayDRO> checkLocalPay(@NotNull(message = "请求对象不能为空") BaseRequestDIO baseRequestDIO);

	/**
	 * 获取支付状态
	 *
	 * @param baseRequestDIO
	 * @return 0 不需要支付，1 需要支付，2 已支付
	 */
	@ApiOperation(value = "获取支付状态", response = Integer.class, notes = "获取支付状态")
	ResponseDTO<Integer> getPayStatus(@NotNull(message = "请求对象不能为空") BaseRequestDIO baseRequestDIO);

	/**
	 * 获取支付渠道和支付方式
	 *
	 * @param baseRequestDIO
	 * @return
	 */
	@ApiOperation(value = "获取支付渠道和支付方式", response = ResponseDTO.class, notes = "获取支付渠道和支付方式")
	ResponseDTO<List<PayChannelDRO>> listPayChannel(@NotNull(message = "请求对象不能为空") BaseRequestDIO baseRequestDIO);

	/**
	 * 是否仅支持银行转账
	 *
	 * @param baseRequestDIO
	 * @return
	 */
	@ApiOperation(value = "是否仅支持银行转账", response = ResponseDTO.class, notes = "是否仅支持银行转账")
	ResponseDTO<Boolean> onlySupportBankTransfer(@NotNull(message = "请求对象不能为空") BaseRequestDIO baseRequestDIO);

	/**
	 * 预付款支付
	 *
	 * @param orderPayDIO
	 * @return
	 */
	@ApiOperation(value = "预付款支付", response = ResponseDTO.class, notes = "预付款支付")
	ResponseDTO<OrderPayDRO> payPrepaidAmount(@NotNull(message = "请求对象不能为空") OrderPayDIO orderPayDIO);

	/**
	 * 定金支付
	 *
	 * @param orderPayDIO
	 * @return
	 */
	@ApiOperation(value = "定金支付", response = ResponseDTO.class, notes = "定金支付")
	ResponseDTO<OrderPayDRO> payDepositAmount(@NotNull(message = "请求对象不能为空") OrderPayDIO orderPayDIO);

	/**
	 * 多次上门定金支付
	 *
	 * @param orderPayDIO
	 * @return
	 */
	@ApiOperation(value = "多次上门定金支付", response = ResponseDTO.class, notes = "多次上门定金支付")
	ResponseDTO<OrderPayDRO> multipleVisitPayDepositAmount(@NotNull(message = "请求对象不能为空") OrderPayDIO orderPayDIO);

	/**
	 * 进度款支付
	 *
	 * @param orderPayDIO
	 * @return
	 */
	@ApiOperation(value = "进度款支付", response = ResponseDTO.class, notes = "进度款支付")
	ResponseDTO<OrderPayDRO> progressPayAmount(@NotNull(message = "请求对象不能为空") OrderPayDIO orderPayDIO);

	/**
	 * 工程师收款支付
	 *
	 * @param orderPayDIO
	 * @return
	 */
	@ApiOperation(value = "工程师收款支付", response = ResponseDTO.class, notes = "工程师收款支付")
	ResponseDTO<OrderPayDRO> payMasterAmount(@NotNull(message = "请求对象不能为空") OrderPayDIO orderPayDIO);

	/**
	 * 校验工程师收款支付
	 *
	 * @param orderId     订单id
	 * @param toPayAmount 待支付金额
	 * @return
	 */
	@ApiOperation(value = "校验工程师收款支付", response = ResponseDTO.class, notes = "校验订单工程师收款支付")
	ResponseDTO<Boolean> verifyPayMasterAmount(@NotNull(message = "订单ID不能为空") Long orderId, @NotNull(message = "待支付金额不能为空") Integer toPayAmount);

	/**
	 * 校验定金支付
	 *
	 * @param orderId     订单id
	 * @param toPayAmount 待支付金额
	 * @return
	 */
	@ApiOperation(value = "校验定金支付", response = ResponseDTO.class, notes = "校验定金支付")
	ResponseDTO<Boolean> verifyPayDepositAmount(@NotNull(message = "订单ID不能为空") Long orderId, @NotNull(message = "待支付金额不能为空") Integer toPayAmount);

	/**
	 * 校验进度款支付
	 *
	 * @param verifyProgressDIO
	 * @return
	 */
	@ApiOperation(value = "校验进度款支付", response = ResponseDTO.class, notes = "校验进度款支付")
	ResponseDTO<Boolean> verifyPayProgressAmount(@NotNull(message = "入参不能为空") VerifyProgressDIO verifyProgressDIO);

	/**
	 * 发送好友代付消息
	 * @param sendAgentPayMessageDIO
	 * @return
	 */
	@ApiOperation(value = "发送好友代付消息", response = ResponseDTO.class, notes = "发送好友代付消息")
	ResponseDTO<Boolean> sendAgentPayMessage(@NotNull(message = "请求对象不能为空") SendAgentPayMessageDIO sendAgentPayMessageDIO);
	/**
	 * 发送好友代付消息
	 * @param orderId
	 * @return
	 */
	@ApiOperation(value = "判断是否是质保金支付", response = ResponseDTO.class, notes = "判断是否是质保金支付")
	ResponseDTO<Boolean> checkWarrantyAmount(@NotNull(message = "订单ID不能为空") Long orderId);
}
